package com.hong.aspect;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;

/**
 * <br>TODO(描述该类的作用)</br>
 *
 * @author 533735
 * @version 1.0
 * @email wanghong3@dafycredit.com
 * @date 2018/11/6 15:03
 * @since 1.0
 */
@Aspect
@Order(1)
public class MultiAdviceAspect {
    @Pointcut("execution(* com.hong.service..*.*(..))")
    public void taskExecution(){ }

    @Before("taskExecution()")
    public void beforeOne(){
        System.out.println("before one");
    }

    @Before("taskExecution()")
    public void beforeTwo(){
        System.out.println("before two");
    }

    @AfterReturning("taskExecution()")
    public void afterReturningOne(){
        System.out.println("after returning one");
    }

    @AfterReturning("taskExecution()")
    public void afterReturningTwo(){
        System.out.println("after returning two");
    }
}
